<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<!-- header -->
		<%@ include file="/WEB-INF/views/include/header.jsp"%>
	</head>
	<body class="no-skin">
		<!-- /section:basics/navbar.layout -->
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<!-- /section:basics/sidebar -->

			<div class="main-content-inner">
				<div class="page-content">
					<!-- /section:settings.box -->
					<div class="row">
						<div class="col-xs-12">

							<h3 align="center">开工提速项目清单</h3>
							<div class="pull-left">
								<button class="btn btn-sm btn-info" id="kaigong-query">刷新任务</button>
								<button class="btn btn-sm btn-info" id="kaigong-export">导出开工项目</button>

							<%--<shiro:hasPermission name="modules:sys:table:query">
                                    <button class="btn btn-sm btn-info" id="query">查询</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:edit">
                                    <button class="btn btn-sm btn-default" id="edit">修改</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:create">
                                    <button class="btn btn-sm btn-success" id="create">新增</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:delete">
                                    <button class="btn btn-sm btn-danger" id="delete">删除</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:excel">
                                    <button class="btn btn-sm btn-pink" id="export">导出</button>
                                </shiro:hasPermission>--%>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<!-- PAGE CONTENT BEGINS -->
							<!-- jqGrid表格 -->
							<table id="gridTable_kaigong"></table>
							<!-- jqGrid工具类 -->
							<div id="gridPager_kaigong"></div>
							<!-- 查询对话框 -->
							<div style="display: none;">
								<%--									<div class="row" id="queryDialog"></div>--%>
							</div>
							<!-- PAGE CONTENT ENDS -->
						</div><!-- /.col -->
					</div><!-- /.row -->
				</div><!-- /.page-content -->
			</div>



			<div class="main-content-inner">
				<div class="page-content">
					<!-- /section:settings.box -->
					<div class="row">
						<div class="col-xs-12">

							<h3 align="center">在建提速项目</h3>
							<div class="pull-left">
								<button class="btn btn-sm btn-info" id="zaijian-query">刷新任务</button>
								<button class="btn btn-sm btn-info" id="zaijian-export">导出再见项目</button>

							<%--<shiro:hasPermission name="modules:sys:table:query">
                                    <button class="btn btn-sm btn-info" id="query">查询</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:edit">
                                    <button class="btn btn-sm btn-default" id="edit">修改</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:create">
                                    <button class="btn btn-sm btn-success" id="create">新增</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:delete">
                                    <button class="btn btn-sm btn-danger" id="delete">删除</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:excel">
                                    <button class="btn btn-sm btn-pink" id="export">导出</button>
                                </shiro:hasPermission>--%>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<!-- PAGE CONTENT BEGINS -->
							<!-- jqGrid表格 -->
							<table id="gridTable_zaijian"></table>
							<!-- jqGrid工具类 -->
							<div id="gridPager_zaijian"></div>
							<!-- 查询对话框 -->
							<div style="display: none;">
								<%--									<div class="row" id="queryDialog"></div>--%>
							</div>
							<!-- PAGE CONTENT ENDS -->
						</div><!-- /.col -->
					</div><!-- /.row -->
				</div><!-- /.page-content -->
			</div>



			<div class="main-content-inner">
				<div class="page-content">
					<!-- /section:settings.box -->
					<div class="row">
						<div class="col-xs-12">

							<h3 align="center">竣工提速项目清单</h3>
							<div class="pull-left">
								<button class="btn btn-sm btn-info" id="jungong-query">刷新任务</button>
								<button class="btn btn-sm btn-info" id="jungong-export">导出竣工项目</button>

							<%--<shiro:hasPermission name="modules:sys:table:query">
                                    <button class="btn btn-sm btn-info" id="query">查询</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:edit">
                                    <button class="btn btn-sm btn-default" id="edit">修改</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:create">
                                    <button class="btn btn-sm btn-success" id="create">新增</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:delete">
                                    <button class="btn btn-sm btn-danger" id="delete">删除</button>
                                </shiro:hasPermission>
                                <shiro:hasPermission name="modules:sys:table:excel">
                                    <button class="btn btn-sm btn-pink" id="export">导出</button>
                                </shiro:hasPermission>--%>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-xs-12">
							<!-- PAGE CONTENT BEGINS -->
							<!-- jqGrid表格 -->
							<table id="gridTable_jungong"></table>
							<!-- jqGrid工具类 -->
							<div id="gridPager_jungong"></div>
							<!-- 查询对话框 -->
							<div style="display: none;">
								<%--									<div class="row" id="queryDialog"></div>--%>
							</div>
							<!-- PAGE CONTENT ENDS -->
						</div><!-- /.col -->
					</div><!-- /.row -->
				</div><!-- /.page-content -->
			</div>



			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
			
			<!-- dialog -->
			<%@ include file="/WEB-INF/views/include/dialog.jsp"%>
		</div><!-- /.main-container -->
		
		<!-- footer -->
		<%@ include file="/WEB-INF/views/include/footer.jsp"%>

		<%--

        ------------------------------------------------------开工------------------------------------------------------------------------
    --%>
		<script type="text/javascript">
			//基本路径
			var baseUrl = "<s:url value="/sys/gongjian/kaigong/manage"></s:url>/"

			//jqgrid的表格高度
			var height = 320;
			//jqgrid表格行头的中文
			var colNames = ['','','','项目名称','当期填报状态',
				'年度计划投资', '攻坚期间计划投资（亿）','计划开工时间',
				'9月节点目标','10月节点目标','11月节点目标',
				'12月节点目标','责任单位','属地乡镇','责任领导','备注',
				'审核状态',"填报时间",'反馈账号','形象进度','完成率', '预计月底能否达成本月节点', "备注（未达标备注）", /*"预估8月至本月底合计完成投资(亿)"*/
				'10月当期投资额','8月至10月总投资额','是否开工'
			];
			//jqgrid表格中每一行的信息模型
			var colModel = [
				{name:'sysId', width:60, hidden: true,key:true},
				{name:'projId',index:'projId', width:60,hidden: true,editable: true},
				{name:'projectId',index:'projectId', hidden:true,width:90, editable: true,align: 'center',},
				{name:'projectName',index:'projectName',        width:300, editable: true},
				{name:'currentBack',index:'currentBack', 		width:90, editable: true,align: 'center',formatter: feedbackFormatter},

				{name:'niandujihua',index:'niandujihua', 		width:100, editable: true,align: 'center',},
				{name:'gongjianjihua',index:'gongjianjihua',    width:120, editable: true,align: 'center',},
				{name:'planStartDate',index:'planStartDate', 	width:100, editable: true,align: 'center',},
				{name:'sepNode',index:'sepNode', 				width:105, editable: true,align: 'center',},
				{name:'octNode',index:'octNode',  				width:130, editable: true,align: 'center',},
				{name:'novNode',index:'novNode', 				width:100, editable: true,align: 'center',},
				{name:'decNode',index:'decNode',				width:100, editable: true,align: 'center',},
				{name:'zerenDept',index:'zerenDept', 				width:120, editable: true,align: 'center',},
				{name:'belong',index:'belong', 					width:100, editable: true,align: 'center',},
				{name:'leaderName',index:'leaderName', 			width:90, editable: true,align: 'center',},
				{name:'remarks',index:'remarks', 				width:200, editable: true,align: 'left',},

				{name: 'audit', index: 'audit', width: 140, editable: true,formatter:auditFormatter},
				{name: 'createDate', index: 'createDate', width: 160, editable: true},
				{name: 'createName', index: 'createName', width: 100, editable: true},
				{name: 'xingxiang', index: 'xingxiang', width: 250, editable: true},
				{name: 'completion', index: 'completion', width: 100, editable: true},

				{name: 'reachoals', index: 'reachoals', width: 200, editable: true,formatter: reahchFormatter},
				{name: 'backRemark', index: 'backRemark', width: 150, editable:                       true},
				{name: 'currentValue', index: 'currentValue', width: 250, editable: true},
				{name: 'totalValue', index: 'totalValue', width: 250, editable: true},
				{name: 'kaigongState', index: 'kaigongState', width: 150, editable:true,formatter: reahchFormatter},

			];

			//jqgrid的具体执行方法
			jqgrid({
				rowNum:10,
				gridTableId : "#gridTable_kaigong",
				gridPagerId : "#gridPager_kaigong",
				multiselect: true,
				autoScroll: true,
				rownumbers: true,
				shrinkToFit: false,
				onSelectRow: function () {

				},
				ondblClickRow:function(rowid)
				{
					console.log(rowid)
					var selectedRowValue = $("#gridTable_kaigong").jqGrid('getRowData', rowid);
					console.log(selectedRowValue)
					var projectId = selectedRowValue.projId;
					console.log(projectId)
					parent.openapp("/sys/gongjian/kaigong/manage/detail/"+projectId,'kaigongdetailman'+projectId,"任务详情")

				},


				treeGrid: true,
				treeGridModel: 'adjacency',
				ExpandColumn : 'projectName',
				jsonReader: {
					repeatitems : false
				},
				treeReader : {
					level_field: "level",
					parent_id_field: "parent",
					leaf_field: "isLeaf",
					expanded_field: "expanded"
				},

			});

			function reahchFormatter(value) {

				switch (value) {
					case 0:
						return "未填写"
					case 1:
						return "是"
					case 2:
						return "否"

				}
			}
			function feedbackFormatter(value) {

				switch (value) {
					case 0:
						return "未填写"
					case 1:
						return '<b style="background-color:#BBFFBB" >已反馈</b>'
					default:
						return "未知错误"

				}
			}
			function  auditFormatter(value){
				switch (value) {
					case 0:
						return "未审核";
					case 1:
						return "审核通过";
					case 2:
						return "审核不通过";

				}
			}


			//加载查询对话框
			// $("#queryDialog").load(getUrl("filter"));

			//重置表单
			function reset() {
				resetForm("#formDialog form");
			}



			//双击列表
		/*	$("#gridTable_kaigong").dblclick(function(e){
				var ids = getSelectIds('#gridTable_kaigong');
				var projectId =ids[0];
				// showView();
				var selectedRowValue = $("#gridTable_kaigong").jqGrid('getRowData', projectId);
				var taskId = selectedRowValue.sysId;
				console.log(projectId)
				parent.openapp("/sys/gongjian/kaigong/manage/detail/"+projectId,'kaigongdetail'+projectId,"任务详情")

			});*/
			$("#kaigong-query").click(function (e) {

				reload("#gridTable_kaigong");

			});

			$("#kaigong-export").click(function () {
				console.log("222")
				window.open("/excel/data/gongjian/excel/2")

			});

		</script>


		<%--	----------------------------------------在建提速----------------------------------------------------------------%>

		<script type="text/javascript">
			//基本路径
			var baseUrl = "<s:url value="/sys/gongjian/zaijian/manage"></s:url>/"

			//jqgrid的表格高度
			var height = 320;
			//jqgrid表格行头的中文
			var colNames = ['','','','项目名称','当期填报状态',
				'年度计划投资', '攻坚期间计划投资（亿）','计划竣工、投产时间',
				'9月完成投资目标','10月完成投资目标','11月完成投资目标',
				'12月完成投资目标','责任单位','属地乡镇','责任领导','备注',
				'审核状态',"填报时间",'反馈账号','形象进度','完成率', '预计月底能否达本月节点目标', "备注（未达标备注）",/* "预估8月至本月底合计完成投资(亿)"*/
				'10月当期投资额','8月至10月总投资额'
			];
			//jqgrid表格中每一行的信息模型
			var colModel = [
				{name:'sysId', width:60, hidden: true,key:true},
				{name:'projId',index:'projId', width:60,hidden: true,editable: true},
				{name:'projectId',index:'projectId', hidden:true,				width:90, editable: true,align: 'center',},
				{name:'projectName',index:'projectName',        width:300, editable: true},
				{name:'currentBack',index:'currentBack', 				width:90, editable: true,align: 'center',formatter: feedbackFormatter},

				{name:'niandujihua',index:'niandujihua', 		width:100, editable: true,align: 'center',},
				{name:'gongjianjihua',index:'gongjianjihua',    width:120, editable: true,align: 'center',},
				{name:'planStartDate',index:'planStartDate', 	width:100, editable: true,align: 'center',},
				{name:'sepNode',index:'sepNode', 				width:105, editable: true,align: 'center',},
				{name:'octNode',index:'octNode',  				width:130, editable: true,align: 'center',},
				{name:'novNode',index:'novNode', 				width:100, editable: true,align: 'center',},
				{name:'decNode',index:'decNode',				width:100, editable: true,align: 'center',},
				{name:'zerenDept',index:'zerenDept', 				width:120, editable: true,align: 'center',},
				{name:'belong',index:'belong', 					width:100, editable: true,align: 'center',},
				{name:'leaderName',index:'leaderName', 			width:90, editable: true,align: 'center',},
				{name:'remarks',index:'remarks', 				width:200, editable: true,align: 'left',},

				{name: 'audit', index: 'adudit', width: 140, editable: true,formatter:auditFormatter},
				{name: 'createDate', index: 'createDate', width: 160, editable: true},
				{name: 'createName', index: 'createName', width: 100, editable: true},
				{name: 'xingxiang', index: 'xingxiang', width: 250, editable: true},
				{name: 'completion', index: 'completion', width: 100, editable: true},

				{name: 'reachoals', index: 'reachoals', width: 200, editable: true,formatter: reahchFormatter},
				{name: 'backRemark', index: 'backRemark', width: 150, editable:                       true},
				// {name: 'addCurrentValue', index: 'addCurrentValue', width: 230, editable:           true},
				{name: 'currentValue', index: 'currentValue', width: 250, editable: true},
				{name: 'totalValue', index: 'totalValue', width: 250, editable: true},
			];

			//jqgrid的具体执行方法
			jqgrid({
				rowNum:10,
				gridTableId : "#gridTable_zaijian",
				gridPagerId : "#gridPager_zaijian",
				multiselect: true,
				autoScroll: true,
				rownumbers: true,
				shrinkToFit: false,
				onSelectRow: function () {

				},
				ondblClickRow:function (rowid) {

					console.log(rowid)
					var selectedRowValue = $("#gridTable_zaijian").jqGrid('getRowData', rowid);
					console.log(selectedRowValue)
					var projectId = selectedRowValue.projId;
					console.log(projectId)
					parent.openapp("/sys/gongjian/zaijian/manage/detail/"+projectId,'zaijiandetailman',"任务详情")

				},
				treeGrid: true,
				treeGridModel: 'adjacency',
				ExpandColumn : 'projectName',
				jsonReader: {
					repeatitems : false
				},
				treeReader : {
					level_field: "level",
					parent_id_field: "parent",
					leaf_field: "isLeaf",
					expanded_field: "expanded"
				},

			});

			function reahchFormatter(value) {

				switch (value) {
					case 0:
						return "未填写"
					case 1:
						return "是"
					case 2:
						return "否"

				}
			}
			function feedbackFormatter(value) {

				switch (value) {
					case 0:
						return "未填写"
					case 1:
						return '<b style="background-color:#BBFFBB" >已反馈</b>'
					default:
						return "未知错误"

				}
			}
			function  auditFormatter(value){
				switch (value) {
					case 0:
						return "未审核";
					case 1:
						return "审核通过";
					case 2:
						return "审核不通过";

				}
			}

			//加载查询对话框
			// $("#queryDialog").load(getUrl("filter"));

			//重置表单
			function reset() {
				resetForm("#formDialog form");
			}

			$("#zaijian-query").click(function (e) {

				reload("#gridTable_zaijian");

			});

			$("#zaijian-export").click(function () {
				console.log("222")
				window.open("/excel/data/gongjian/excel/3")

			});

		</script>
		<%---------------------------------------------竣工投产项目 ------------------------------          --%>
		<script type="text/javascript">
			//基本路径
			var baseUrl = "<s:url value="/sys/gongjian/jungong/manage"></s:url>/"

			//jqgrid的表格高度
			var height = 320;
			//jqgrid表格行头的中文
			var colNames = ['','','','项目名称','当期填报状态',
				'年度计划投资', '攻坚期间计划投资（亿）','计划竣工、投产时间',
				'9月完成投资目标','10月完成投资目标','11月完成投资目标',
				'12月完成投资目标','责任单位','属地乡镇','责任领导','备注',
				'审核状态',"填报时间",'反馈账号','形象进度','完成率', '预计月底能否达本月节点目标', "备注（未达标备注）", '10月当期投资额','8月至10月总投资额','是否竣工'/*"预估8月至本月底合计完成投资(亿)"*/];
			//jqgrid表格中每一行的信息模型
			var colModel = [
				{name:'sysId', width:60, hidden: true,key:true},
				{name:'projId',index:'projId', width:60,hidden: true,editable: true},
				{name:'projectId',index:'projectId', hidden:true,				width:90, editable: true,align: 'center',},
				{name:'projectName',index:'projectName',        width:300, editable: true},
				{name:'currentBack',index:'currentBack', 				width:90, editable: true,align: 'center',formatter: feedbackFormatter},

				{name:'niandujihua',index:'niandujihua', 		width:100, editable: true,align: 'center',},
				{name:'gongjianjihua',index:'gongjianjihua',    width:120, editable: true,align: 'center',},
				{name:'planStartDate',index:'planStartDate', 	width:100, editable: true,align: 'center',},
				{name:'sepNode',index:'sepNode', 				width:105, editable: true,align: 'center',},
				{name:'octNode',index:'octNode',  				width:130, editable: true,align: 'center',},
				{name:'novNode',index:'novNode', 				width:100, editable: true,align: 'center',},
				{name:'decNode',index:'decNode',				width:100, editable: true,align: 'center',},
				{name:'zerenDept',index:'zerenDept', 				width:120, editable: true,align: 'center',},
				{name:'belong',index:'belong', 					width:100, editable: true,align: 'center',},
				{name:'leaderName',index:'leaderName', 			width:90, editable: true,align: 'center',},
				{name:'remarks',index:'remarks', 				width:200, editable: true,align: 'left',},

				{name: 'audit', index: 'adudit', width: 140, editable: true,formatter:auditFormatter},
				{name: 'createDate', index: 'createDate', width: 160, editable: true},
				{name: 'createName', index: 'createName', width: 100, editable: true},
				{name: 'xingxiang', index: 'xingxiang', width: 250, editable: true},
				{name: 'completion', index: 'completion', width: 100, editable: true},

				{name: 'reachoals', index: 'reachoals', width: 200, editable: true,formatter: reahchFormatter},
				{name: 'remarks', index: 'remarks', width: 150, editable:true},
				// {name: 'addCurrentValue', index: 'addCurrentValue', width: 230, editable:  true},
				{name: 'currentValue', index: 'currentValue', width: 250, editable: true},
				{name: 'totalValue', index: 'totalValue', width: 250, editable: true},
				{name: 'jungongState', index: 'jungongState', width: 150, editable: true,formatter: reahchFormatter},


			];

			//jqgrid的具体执行方法
			jqgrid({
				rowNum:10,
				gridTableId : "#gridTable_jungong",
				gridPagerId : "#gridPager_jungong",
				multiselect: true,
				autoScroll: true,
				rownumbers: true,
				shrinkToFit: false,
				onSelectRow: function () {

				},
				ondblClickRow:function (rowid) {

					console.log(rowid)
					var selectedRowValue = $("#gridTable_jungong").jqGrid('getRowData', rowid);
					console.log(selectedRowValue)
					var projectId = selectedRowValue.projId;
					console.log(projectId)

					parent.openapp("/sys/gongjian/jungong/manage/detail/"+projectId,'jungongdetailman',"任务详情")


				},
				treeGrid: true,
				treeGridModel: 'adjacency',
				ExpandColumn : 'projectName',
				jsonReader: {
					repeatitems : false
				},
				treeReader : {
					level_field: "level",
					parent_id_field: "parent",
					leaf_field: "isLeaf",
					expanded_field: "expanded"
				},
			});

			function reahchFormatter(value) {

				switch (value) {
					case 0:
						return "未填写"
					case 1:
						return "是"
					case 2:
						return "否"

				}
			}
			function feedbackFormatter(value) {

				switch (value) {
					case 0:
						return "未填写"
					case 1:
						return '<b style="background-color:#BBFFBB" >已反馈</b>'

					default:
						return "未知错误"

				}
			}
			function  auditFormatter(value){
				switch (value) {
					case 0:
						return "未审核";
					case 1:
						return "审核通过";
					case 2:
						return "审核不通过";

				}
			}

			//加载查询对话框
			// $("#queryDialog").load(getUrl("filter"));

			//重置表单
			function reset() {
				resetForm("#formDialog form");
			}

			$("#jungong-query").click(function (e) {

				reload("#gridTable_jungong");

			});

			$("#jungong-export").click(function () {
				console.log("222")
				window.open("/excel/data/gongjian/excel/4")

			});


		</script>


	</body>
</html>